package com.ziki.framework.wicket.markup.html.form;

import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.SubmitLink;
import org.apache.wicket.model.IModel;

import com.ziki.framework.wicket.util.AttributeUtil;

public class FwSubmitLink extends SubmitLink {
    private static final long serialVersionUID = 1L;

    public FwSubmitLink(String id) {
        super(id);
    }

    public FwSubmitLink(String id, Form<?> form) {
        super(id, form);
    }

    public FwSubmitLink(String id, IModel<?> model) {
        super(id, model);
    }

    public FwSubmitLink(String id, IModel<?> model, Form<?> form) {
        super(id, model, form);
    }

    public void setAttribute(String attribute, String value) {
        AttributeUtil.setAttribute(this, attribute, value);
    }

    public String getAttribute(String attribute) {
        return AttributeUtil.getAttribute(this, attribute);
    }

    public void appendAttribute(String attribute, String value) {
        AttributeUtil.appendAttribute(this, attribute, value);
    }

    public void prependAttribute(String attribute, String value) {
        AttributeUtil.prependAttribute(this, attribute, value);
    }

    public void replaceAttribute(String attribute, String value) {
        AttributeUtil.replaceAttribute(this, attribute, value);
    }

    public void setStyle(String value) {
        setAttribute("style", value);
    }

    public void clearStyle() {
        setAttribute("style", "");
    }
}
